package com.bt.lms.ui.action.teaching.plan.utils;

/**
 * 合并数组
 * @author 李舒淇
 */
public class MyByte {

    /**
     * 合并数组
     */
    public static byte[] mergeByte(byte[]... bytes) {


        int length = 0;
        for (byte[] a : bytes) {
            length += a.length;
        }
        byte[] general = new byte[length];
        int targetLocation = 0;
        for (byte[] a : bytes) {
            System.arraycopy(a, 0, general, targetLocation, a.length);
            targetLocation += a.length;
        }


        return general;
    }
}
